package org.finesys.common.disruptor.hooks;


import com.lmax.disruptor.dsl.Disruptor;
import org.finesys.common.disruptor.event.DisruptorEvent;

public class DisruptorShutdownHook extends Thread {

    private Disruptor<DisruptorEvent> disruptor;

    public DisruptorShutdownHook(Disruptor<DisruptorEvent> disruptor) {
        this.disruptor = disruptor;
    }

    @Override
    public void run() {
        disruptor.shutdown();
    }
}
